<!DOCTYPE html>
<html lang="zh_CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Set render engine for 360 browser -->
<meta name="renderer" content="webkit">
<meta charset="utf-8">
<title>木禧传媒 {:L('ADMIN_CENTER')}</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="//cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet">

<!--[if IE 7]>
	<link rel="stylesheet" href="__PUBLIC__/simpleboot/font-awesome/4.4.0/css/font-awesome-ie7.min.css">
<![endif]-->
<link href="__TMPL__Public/assets/css/simplebootadmin.css" rel="stylesheet">
<!--[if lte IE 8]>
	<link rel="stylesheet" href="__PUBLIC__/simpleboot/css/simplebootadminindex-ie.css?" />
<![endif]-->
<style>
.navbar .nav_shortcuts .btn{margin-top: 5px;}
.macro-component-tabitem{width:101px;}
.admin-foot{
	height:60px;
	background: #F0F0F0;
	position: absolute;
	bottom: 0px;
	width: 100%;
}

/*-----------------导航hack--------------------*/
.nav-list>li.open{position: relative;}
.nav-list>li.open .back {display: none;}
.nav-list>li.open .normal {display: inline-block !important;}
.nav-list>li.open a {padding-left: 7px;}
.nav-list>li .submenu>li>a {}
.nav-list>li .submenu>li a>[class*="fa-"]:first-child{left:32px;}
.nav-list>li ul.submenu ul.submenu>li a>[class*="fa-"]:first-child{left:30px;}
/*----------------导航hack--------------------*/
</style>

<script>
//全局变量
var GV = {
	HOST:"{$_SERVER['HTTP_HOST']}",
    DIMAUB: "",
    JS_ROOT: "__PUBLIC__/js/",
    TOKEN: ""
};
</script>
<php>$submenus=$SUBMENU_CONFIG;</php>

<php>function getsubmenu($submenus){</php>
<php>foreach($submenus as $menu){ </php>
					<li class="menu-left-nest">
						<php>
							$menu_name=L($menu['lang']);
							$menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
						</php>
						<php>if(empty($menu['items'])){</php>
							<a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">
								<i class="fa fa-{$menu.icon|default='desktop'}"></i>
								<span class="menu-text">
									{$menu_name}
								</span>
							</a>
						<php>}else{</php>
							<a href="#">
								<i class="fa fa-{$menu.icon|default='desktop'} pull-right normal"></i>
								<span class="menu-text normal">
									{$menu_name}
								</span>
							</a>

							<ul class="nav">
									<php>getsubmenu1($menu['items'])</php>
							</ul>
						<php>}</php>

					</li>

				<php>}</php>
<php>}</php>

<php>function getsubmenu1($submenus){</php>
<php>foreach($submenus as $menu){</php>
					<li>
						<php>
							$menu_name=L($menu['lang']);
							$menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
						</php>
						<php>if(empty($menu['items'])){</php>
							<a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">
								<i class="fa fa-caret-right"></i>
								<span>
									{$menu_name}
								</span>
							</a>
						<php>}else{</php>
							<a href="#" class="dropdown-toggle">
								<i class="fa fa-caret-right"></i>
								<span>
									{$menu_name}
								</span>
							</a>
							<ul  class="submenu">
									<php>getsubmenu2($menu['items'])</php>
							</ul>
						<php>}</php>

					</li>

				<php>}</php>
<php>}</php>

<php>function getsubmenu2($submenus){</php>
<php>foreach($submenus as $menu){</php>
					<li>
						<php>
							$menu_name=L($menu['lang']);
							$menu_name=$menu['lang']==$menu_name?$menu['name']:$menu_name;
						</php>

						<a href="javascript:openapp('{$menu.url}','{$menu.id}','{$menu_name}',true);">
							&nbsp;<i class="fa fa-angle-double-right"></i>
							<span>
								{$menu_name}
							</span>
						</a>
					</li>

				<php>}</php>
<php>}</php>


<if condition="APP_DEBUG">
<style>
#think_page_trace_open{left: 0 !important;
right: initial !important;}
</style>
</if>

</head>

<body style="min-width:900px;" screen_capture_injected="true">
<!--顶部结构-->
	<div class="admin-top">
		<div class="admin-top-logo pull-left text-center">
			<a href="{:U('index/index')}"><h3>{:L('ADMIN_CENTER')}</h3></a>
		</div>
		<div class="pull-left nav_shortcuts">
			<a href="__ROOT__/" title="{:L('WEBSITE_HOME_PAGE')}" target="_blank">
				<i class="fa fa-home"></i>
			</a>
			<if condition="sp_auth_check(sp_get_current_admin_id(),'admin/setting/clearcache')">
				<a href="javascript:openapp('{:U('admin/setting/clearcache')}','index_clearcache','{:L('ADMIN_SETTING_CLEARCACHE')}');" title="{:L('ADMIN_SETTING_CLEARCACHE')}">
					<i class="fa fa-trash-o"></i>
				</a>
			</if>
		</div>
		<!-- <div class="pull-left admin-info">


		</div> -->
		<ul class="nav simplewind-nav pull-right">
			<li class="light-blue">
				<a data-toggle="dropdown" href="#" class="dropdown-toggle">
					<if condition="$admin['avatar']">
						<img class="nav-user-photo" width="30" height="30" src="{:sp_get_user_avatar_url($admin['avatar'])}" alt="{$admin.user_login}">
					<else />
						<img class="nav-user-photo" width="30" height="30" src="__TMPL__Public/assets/images/logo-18.png" alt="{$admin.user_login}">
					</if>
					<span class="user-info">
						{:L('WELCOME_USER',array('username'=>empty($admin['user_nicename'])?$admin['user_login']:$admin['user_nicename']))}
					</span>
					<i class="fa fa-caret-down"></i>
				</a>
				<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer">
					<if condition="sp_auth_check(sp_get_current_admin_id(),'admin/setting/site')">
						<li><a href="javascript:openapp('{:U('setting/site')}','index_site','{:L('ADMIN_SETTING_SITE')}');"><i class="fa fa-cog"></i> {:L('ADMIN_SETTING_SITE')}</a></li>
					</if>
					<if condition="sp_auth_check(sp_get_current_admin_id(),'admin/user/userinfo')">
						<li><a href="javascript:openapp('{:U('user/userinfo')}','index_userinfo','{:L('ADMIN_USER_USERINFO')}');"><i class="fa fa-user"></i> {:L('ADMIN_USER_USERINFO')}</a></li>
					</if>
					<li><a href="{:U('Public/logout')}"><i class="fa fa-sign-out"></i> {:L('LOGOUT')}</a></li>
				</ul>
			</li>
		</ul>

	</div>
<!--左侧结构-->
	<div style="width:230px;float:left;height:700px;overflow:auto">
		<ul class="nav nav-list">
				{:getsubmenu($submenus)}
		</ul>
	</div>


<!--右侧结构-->
	<div style="margin:0px;padding:0px; width:auto;margin-left:240px;">
		<div class="main-content">
			<div class="paper-wrap bevel tlbr">
				<div class="breadcrumbs" id="breadcrumbs">
					<a id="task-pre" class="task-changebt">←</a>
					<div id="task-content">
						<ul class="macro-component-tab" id="task-content-inner">
							<li class="pull-left"><i class="fa fa-home"></i></li>
							<li class="macro-component-tabitem noclose" app-id="0" app-url="{:U('main/index')}" app-name="首页">
								<span class="macro-tabs-item-text">{:L('HOME')}</span>
							</li>
						</ul>
						<div style="clear:both;"></div>
					</div>
					<a id="task-next" class="task-changebt">→</a>
					<div class="pull-right">
						<input style="border-radius:15px" type="text" placeholder="Search..." class="form-control">
					</div>
				</div>
				<div class="container-fluid">
					<div class="page-content" id="content" style="height:1500px;">
						<iframe src="{:U('Main/index')}" style="width:100%; height:1500px;" frameborder="0" id="appiframe-0" class="appiframe"></iframe>
					</div>
				</div>
				<div class="admin-foot">
					<p class="pull-right" style="margin-top:20px; margin-right:100px; font-size:14px; color: #A2A2AF;">
					Make by Rainy,RainyTribe provide technical support and service. email:121625706@qq.com
					</p>
				</div>
			</div>
		</div>
	</div>


<script src="//cdn.bootcss.com/jquery/1.8.1/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script>
	var ismenumin = $("#sidebar").hasClass("menu-min");
	$(".nav-list").on( "click",function(event) {
		var closest_a = $(event.target).closest("a");
		if (!closest_a || closest_a.length == 0) {
			return
		}
		if (!closest_a.hasClass("dropdown-toggle")) {
			if (ismenumin && "click" == "tap" && closest_a.get(0).parentNode.parentNode == this) {
				var closest_a_menu_text = closest_a.find(".menu-text").get(0);
				if (event.target != closest_a_menu_text && !$.contains(closest_a_menu_text, event.target)) {
					return false
				}
			}
			return
		}
		var closest_a_next = closest_a.next().get(0);
		if (!$(closest_a_next).is(":visible")) {
			var closest_ul = $(closest_a_next.parentNode).closest("ul");
			if (ismenumin && closest_ul.hasClass("nav-list")) {
				return
			}
			closest_ul.find("> .open > .submenu").each(function() {
						if (this != closest_a_next && !$(this.parentNode).hasClass("active")) {
							$(this).slideUp(150).parent().removeClass("open")
						}
			});
		}
		if (ismenumin && $(closest_a_next.parentNode.parentNode).hasClass("nav-list")) {
			return false;
		}
		$(closest_a_next).slideToggle(150).parent().toggleClass("open");
		return false;
	});
	</script>
	<script src="__TMPL__Public/assets/js/index.js"></script>
</body>
</html>
